package com.king.security.ctrl;

import com.king.security.config.TestProperties;
import com.king.security.entity.MyUser;
import com.king.security.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author KING
 * @date 2018/8/30 22:15
 */
@RestController
@RequestMapping(value = "test")
public class TestControl {

    @Autowired
    public TestProperties TestProperties;

    @Autowired
    public UserService userService;

    @GetMapping(value = "/hello")
    public String hello() {
        List<MyUser> users = new ArrayList<>();
        //users = userService.addUser();
        String str = TestProperties.getTitle();
        str = "Hello Spring Boot!" + str + "---薪资:" + users.size() + "万";
        System.out.println(str);
        return str;
    }
}

